import request from '@/http/request'

// 外部商品列表
export const $apiVirtualOutside = (params:any) => {
    return request.request({ url: '/api/virtual/outside', method: 'GET', params: params }, true, true, false)
  }


// 同步商品详情
export function $outDetail(data:any){
  return request.request({
    url: '/api/virtual/outside/refreshGoods',
    method: 'post',
    data
  })
}

// 取消订阅
export function $cancelSubscribe(data:any){
  return request.request({
    url: '/api/virtual/outside/goodsUnSubscribe',
    method: 'post',
    data
  })
}

// 订阅
export function $apiVirtualOutsideGoodsSubscribe(data:any){
    return request.request({
      url: '/api/virtual/outside/goodsSubscribe',
      method: 'post',
      data
    })
  }

// 外部商品保存
// export const API_URL_VIRTUAL_GOODS_OUTSIDE_SAVE = '/api/virtual/outside/outToInsideGoods'
export function $apiVirtualOutsideOutToInsideGoods(data:any){
    return request.request({
      url: '/api/virtual/outside/outToInsideGoods',
      method: 'post',
      data
    })
  }
